<template>
  <el-switch v-model="value" v-bind="$attrs" />
</template>

<script setup lang="ts">
import { computed } from 'vue'

const props = defineProps({
  modelValue: [Boolean, String, Number]
})

const emits = defineEmits({
  'update:modelValue': (val: any) => val
})

const value: any = computed({
  get: () => {
    return props.modelValue
  },
  set: (val) => {
    emits('update:modelValue', val)
  }
})

defineOptions({
  name: 'CESwitch'
})
</script>

<style scoped></style>
